#!/bin/sh

cd src && ./configure
cd ..

echo -n "Generating makefile: "

cat <<EOF > Makefile

### Building targets

jni: matvec
	cd jni && ant build

matvec: 
	cd src && make

### Installation targets

install: install-matvec install-jni

install-matvec:
	cd src && make install

install-jni:
	cd jni && ant install

### Cleaning targets

clean-jni:
	cd jni && ant clean

clean-matvec:
	cd src && make clean

clean:
	cd src && make clean
	cd jni && ant clean

EOF

echo "OK"